package com.streambolics.std;

import java.util.ArrayList;
import java.util.TimeZone;

public class TimeZoneUtil
{
    private static ArrayList<TimeZone> _AllTimeZones;

    public static String countryCodeToTimeZoneName (String aCountryCode)
    {
        if (aCountryCode == null)
        {
            return "UTC";
        }
        if (aCountryCode.equals ("BE"))
        {
            return "Europe/Brussels";
        }

        return "UTC";
    }

    public static Iterable<TimeZone> getAllTimeZones ()
    {
        if (_AllTimeZones == null)
        {
            _AllTimeZones = new ArrayList<TimeZone> ();
            for (String s : TimeZone.getAvailableIDs ())
            {
                TimeZone t = TimeZone.getTimeZone (s);
                _AllTimeZones.add (t);
            }
        }
        return _AllTimeZones;
    }

}
